<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

function dbdate_to_human($date='',$format='d/m/Y'){
	$salida=null;
	if(strlen($date)>0)
		$salida=date_format($date, $format);

	return $salida;
}

function human_to_dbdate($date='',$format='d/m/Y'){
	$salida=null;
	if(strlen($date)>0)
		$salida=date_format(date_create_from_format($format,$date),'Y-m-d');

	return $salida;
}



?>
